#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QVector>

namespace Ui {
class MainWindow;
}

class GameBoard;

class MainWindow : public QMainWindow {
    Q_OBJECT
public:
    explicit MainWindow(QWidget *parent = nullptr, int playerCount = 2);
    ~MainWindow();

private slots:
    void on_rollButton_clicked();
    void on_resetButton_clicked();
    void on_playerComboBox_currentIndexChanged(int index);
    void processDiceResult(int dice);  // 添加缺失的槽函数声明

private:
    Ui::MainWindow *ui;
    GameBoard* m_gameBoard;

    int m_playerCount;
    int m_currentPlayer;
    QVector<int> m_positions;
    bool m_gameOver;

    void handleSpecialGrid(int type, int &position);
    void showVictory();
    void updateStatus();
};

#endif // MAINWINDOW_H
